<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file="common.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>新书上架</title>
        <link href="CSS/style1.css" rel="stylesheet">
    </head>
<body>
        
         
    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
<table width="750" height="768"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td valign="top">
        <jsp:include page="banner.jsp"/>
	<table width="100%" height="330"  border="0" cellpadding="0" cellspacing="0">
        <tr>       
     
          <td width="73%" valign="top"><table width="100%" height="272"  border="0" cellpadding="0" cellspacing="0">
          
            <tr>
              <td width="97%" height="220" valign="top">
			   <table width="100%" height="126"  border="0" cellpadding="0" cellspacing="0">
			    <tr>
                  <td valign="top"><table width="100%" height="55"  border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td class="tableBorder_B"><img src="Images/index_12.gif" width="161" height="48"></td>
                    </tr>
                    <tr>
                      <td width="86%" height="100" valign="top">
						<table width="96%" height="34"  border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder_B">
                          <tr>
                            <td width="6%" height="33" align="center">&nbsp;</td>
                            <td width="53%" style="padding:5px;">书名</td>
                            <td width="31%" style="padding:5px;"> 出版社</td>
                            <td width="10%" style="padding:5px;">购买</td>
                          </tr>
                        </table>
                               <%
                            java.util.Collection l = bookDB.getNewBook();
                            java.util.Iterator i = l.iterator();
                         BookDetails bt = null;
                      
                            while (i.hasNext()){
                                bt = (BookDetails) i.next();              
                                %> 
                     
                        <table width="96%" height="21"  border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder_B">
                          <tr>
                            <td width="6%" align="center"><img src="Images/greendot.gif" width="11" height="13"></td>
                            <td width="53%" style="padding:5px;"><a href="bookdetails.jsp?bookId=<%=bt.getBookid()%>"><%=bt.getTitle()%></a></td>
                            <td width="31%" style="padding:5px;"><%=bt.getPubilsher()%></td>
                            <td width="10%" style="padding:5px;">
							<%if(session.getAttribute("UserName")!=null){%>
							 <input name="Submit5" type="submit" class="btn_grey" value="放入购物车" onClick="window.location.href='catalog.jsp?Add=<%=bt.getBookid()%>'">
							<%}else{
							out.println("请先登录");
							}%>
							</td>
                          </tr>
                        </table>
                        <%}%></td>
                    </tr>
                  </table></td>
			     </tr>
              </table>
					  </td>
              <td width="3%" valign="top">&nbsp;</td>
            </tr>
          </table></td>
        </tr>
      </table>
      <jsp:include page="copyright.jsp"/>
    </td>
  </tr>
</table>
</td>
  </tr>
</table>
    </body>
</html>
